﻿Imports System
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Drawing
Imports System.Workflow.ComponentModel
Imports System.Workflow.ComponentModel.Compiler

Namespace System.Workflow.Activities
    <SRCategory("Standard"), Designer(GetType(IfElseBranchDesigner), GetType(IDesigner)), ToolboxItem(False), ActivityValidator(GetType(IfElseBranchValidator)), ToolboxBitmap(GetType(IfElseBranchActivity), "Resources.DecisionBranch.bmp")> _
    Public NotInheritable Class IfElseBranchActivity
        Inherits SequenceActivity
        ' Methods
        Public Sub New()
        End Sub

        Public Sub New(ByVal name As String)
            MyBase.New(name)
        End Sub


        ' Properties
        <SRCategory("Conditions"), SRDescription("ConditionDescr"), DefaultValue(CStr(Nothing)), RefreshProperties(RefreshProperties.Repaint)> _
        Public Property Condition As ActivityCondition
            Get
                Return [TryCast](MyBase.GetValue(IfElseBranchActivity.ConditionProperty),ActivityCondition)
            End Get
            Set(ByVal value As ActivityCondition)
                MyBase.SetValue(IfElseBranchActivity.ConditionProperty, value)
            End Set
        End Property


        ' Fields
        Public Shared ReadOnly ConditionProperty As DependencyProperty = DependencyProperty.Register("Condition", GetType(ActivityCondition), GetType(IfElseBranchActivity), New PropertyMetadata(DependencyPropertyOptions.Metadata))
    End Class
End Namespace

